package com.chapter0.string;

import java.util.Arrays;
import java.util.List;


/**
 * String 转换为 List< String >
 *
 * list/ArrayList https://blog.csdn.net/qq_64668629/article/details/132831237
 */
public class test3 {

    public static void main(String[] args) {

        String ids="1,2,3,4,5,6,7,8,9";
        List<String> list = Arrays.asList(ids.split(","));
        //String  1,2,3,4,5,6,7,8,9
        System.out.println(ids);
        //List< String >   [1, 2, 3, 4, 5, 6, 7, 8, 9]
        System.out.println(list);
    }
}
